package com.jsmile.cloud.msgcenter.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付类型(枚举)
 *
 * @author Morily
 */
@Getter
@AllArgsConstructor
public enum MsgTypeEnum {

    HEART_CHECK_NOTIFY("heart_check_notify", "心跳检测通知");

    /**
     * 值
     */
    private String value;
    private String name;

    /**
     * 根据value获取 名称
     */
    public static MsgTypeEnum nameOf(String value) {
        MsgTypeEnum type = null;
        if (null != value) {
            for (MsgTypeEnum rt : MsgTypeEnum.values()) {
                if (rt.getValue().equals(value)) {
                    type = rt;
                    break;
                }
            }
        }
        return type;
    }
}
